from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
from sklearn.metrics import accuracy_score
# import matplotlib.pyplot as plt

X,y = load_breast_cancer(return_X_y=True)
X_train,X_test,y_train,y_test = train_test_split(X,y,test_size=0.15)

lr = LinearRegression()
lr.fit(X_train,y_train)
y_test_predict = lr.predict(X_test)
# print(round(y_test_predict))
r = (y_test_predict > 0.3).astype(float)
print(r)
print(accuracy_score(r,y_test))
print(mean_squared_error(y_test_predict,y_test))